package gov.kqqzyyy.monkey.orderpad.mytools;

import android.app.Application;
import android.content.Context;
import android.util.ArrayMap;

import com.facebook.drawee.backends.pipeline.Fresco;
import com.socks.library.KLog;

import java.util.List;

import gov.kqqzyyy.monkey.orderpad.BuildConfig;
import gov.kqqzyyy.monkey.orderpad.object.FloorPatient;
import gov.kqqzyyy.monkey.orderpad.object.FloorsAndBeds;
import gov.kqqzyyy.monkey.orderpad.object.XTGL;

/**
 * Created by Monkey on 2017/12/20.
 * 自定义Application，存储全局变量
 */

public class MyApplication extends Application {


    private long deltaTime = 0;//与服务器时间差

    public static Context applicationContext;

    private String chooseFloor = "";
    private String chooseCH = "";
    private String qssj = "", jssj = "";

    private List<FloorsAndBeds> mFloorList;
    private List<String> mFloorsNameList;
    private boolean isGettingPatientInfo = false, isGettingCPXX = false;
    private ArrayMap<String, List<String>> lcchArrayMap;
    private ArrayMap<String, List<String>> lcbrArrayMap;
    private ArrayMap<String, List<FloorPatient>> lcPatientArrayMap;
    //    private LoginUser loginUser;
    private XTGL xtgl;
    private long deleta;

    @Override
    public void onCreate() {
        super.onCreate();
//        CrashHandler.getInstance().init(this);
        Fresco.initialize(this);
        KLog.init(BuildConfig.LOG_DEBUG);
        applicationContext = this;
    }

    public String getQssj() {
        return qssj;
    }

    public void setQssj(String qssj) {
        this.qssj = qssj;
    }

    public String getJssj() {
        return jssj;
    }

    public void setJssj(String jssj) {
        this.jssj = jssj;
    }

    public XTGL getXtgl() {
        return xtgl;
    }

    public void setXtgl(XTGL xtgl) {
        this.xtgl = xtgl;
    }

    public long getDeleta() {
        return deleta;
    }

    public void setDeleta(long deleta) {
        this.deleta = deleta;
    }

    public String getChooseCH() {
        return chooseCH;
    }

    public void setChooseCH(String chooseCH) {
        this.chooseCH = chooseCH;
    }

    public List<String> getmFloorsNameList() {
        return mFloorsNameList;
    }

    public void setmFloorsNameList(List<String> mFloorsNameList) {
        this.mFloorsNameList = mFloorsNameList;
    }

    public ArrayMap<String, List<String>> getLcchArrayMap() {
        return lcchArrayMap;
    }

    public void setLcchArrayMap(ArrayMap<String, List<String>> lcchArrayMap) {
        this.lcchArrayMap = lcchArrayMap;
    }

    public ArrayMap<String, List<String>> getLcbrArrayMap() {
        return lcbrArrayMap;
    }

    public void setLcbrArrayMap(ArrayMap<String, List<String>> lcbrArrayMap) {
        this.lcbrArrayMap = lcbrArrayMap;
    }

    public ArrayMap<String, List<FloorPatient>> getLcPatientArrayMap() {
        return lcPatientArrayMap;
    }

    public void setLcPatientArrayMap(ArrayMap<String, List<FloorPatient>> lcPatientArrayMap) {
        this.lcPatientArrayMap = lcPatientArrayMap;
    }

    public List<FloorsAndBeds> getmFloorList() {
        return mFloorList;
    }

    public void setmFloorList(List<FloorsAndBeds> mFloorList) {
        this.mFloorList = mFloorList;
    }

    public String getChooseFloor() {
        return chooseFloor;
    }

    public void setChooseFloor(String chooseFloor) {
        this.chooseFloor = chooseFloor;
    }

    public long getDeltaTime() {
        return deltaTime;
    }

    public void setDeltaTime(long deltaTime) {
        this.deltaTime = deltaTime;
    }

    public boolean isGettingPatientInfo() {
        return isGettingPatientInfo;
    }

    public void setGettingPatientInfo(boolean gettingPatientInfo) {
        isGettingPatientInfo = gettingPatientInfo;
    }

    public boolean isGettingCPXX() {
        return isGettingCPXX;
    }

    public void setGettingCPXX(boolean gettingCPXX) {
        isGettingCPXX = gettingCPXX;
    }
}
